

function websiteGallery(pageName)
{
	var totalWebpages = 6;
	
	var prevPage = 0;
	if(pageName == 'Home')
		prevPage = totalWebpages - 1;
	else if(pageName == 0)
		prevPage = totalWebpages - 1;		
	else
		prevPage = pageName - 1;
	
	var nextPage = 0;
	if(pageName == "Home")
		nextPage = 0;
	else if((pageName+1) == totalWebpages)
		nextPage = 0;
	else
		nextPage = pageName + 1;
	
	document.write('<a href="website_page'+prevPage+'.html" class="nextButton">Previous</a><a href="website_page'+nextPage+'.html" class="nextButton">Next</a>');

	
	/*
	 * Home Page
	 */
	if(pageName == 'Home')
	{
		document.write('<a href="website_page0.html"><img src="images/website_xbox_thum.png" /></a>');
		document.write('<a href="website_page1.html"><img src="images/website_capstone_thum.png" /></a>');
		document.write('<a href="website_page2.html"><img src="images/website_csel_thum.png" /></a>');
		document.write('<a href="website_page3.html"><img src="images/website_dm2_thum.png" /></a>');
		document.write('<a href="website_page4.html"><img src="images/website_tam_thum.png" /></a>');
		document.write('<a href="website_page5.html"><img src="images/website_dm1_thum.png" /></a>');
	}
	/*
	 * XBOX
	 */
	else if(pageName == 0)
	{
		document.write('<a href="website_page0.html"><img src="images/website_xbox_thum.png" class="here" /></a>');
		document.write('<a href="website_page1.html"><img src="images/website_capstone_thum.png" /></a>');
		document.write('<a href="website_page2.html"><img src="images/website_csel_thum.png" /></a>');
		document.write('<a href="website_page3.html"><img src="images/website_dm2_thum.png" /></a>');
		document.write('<a href="website_page4.html"><img src="images/website_tam_thum.png" /></a>');
		document.write('<a href="website_page5.html"><img src="images/website_dm1_thum.png" /></a>');
	}
	/* 
	 * Capstone
	 */
	else if(pageName == 1)
	{
		document.write('<a href="website_page0.html"><img src="images/website_xbox_thum.png" /></a>');
		document.write('<a href="website_page1.html"><img src="images/website_capstone_thum.png" class="here" /></a>');
		document.write('<a href="website_page2.html"><img src="images/website_csel_thum.png" /></a>');
		document.write('<a href="website_page3.html"><img src="images/website_dm2_thum.png" /></a>');
		document.write('<a href="website_page4.html"><img src="images/website_tam_thum.png" /></a>');
		document.write('<a href="website_page5.html"><img src="images/website_dm1_thum.png" /></a>');
	}
	/*
	 * CSEL
	 */
	else if(pageName == 2)
	{
		document.write('<a href="website_page0.html"><img src="images/website_xbox_thum.png" /></a>');
		document.write('<a href="website_page1.html"><img src="images/website_capstone_thum.png" /></a>');
		document.write('<a href="website_page2.html"><img src="images/website_csel_thum.png" class="here" /></a>');
		document.write('<a href="website_page3.html"><img src="images/website_dm2_thum.png" /></a>');
		document.write('<a href="website_page4.html"><img src="images/website_tam_thum.png" /></a>');
		document.write('<a href="website_page5.html"><img src="images/website_dm1_thum.png" /></a>');
	}
	
	/*
	 * DM2
	 */
	else if(pageName == 3)
	{
		document.write('<a href="website_page0.html"><img src="images/website_xbox_thum.png" /></a>');
		document.write('<a href="website_page1.html"><img src="images/website_capstone_thum.png" /></a>');
		document.write('<a href="website_page2.html"><img src="images/website_csel_thum.png" /></a>');
		document.write('<a href="website_page3.html"><img src="images/website_dm2_thum.png" class="here" /></a>');
		document.write('<a href="website_page4.html"><img src="images/website_tam_thum.png" /></a>');
		document.write('<a href="website_page5.html"><img src="images/website_dm1_thum.png" /></a>');
	}
	/*
	 * TAM
	 */
	else if(pageName == 4)
	{
		document.write('<a href="website_page0.html"><img src="images/website_xbox_thum.png" /></a>');
		document.write('<a href="website_page1.html"><img src="images/website_capstone_thum.png" /></a>');
		document.write('<a href="website_page2.html"><img src="images/website_csel_thum.png" /></a>');
		document.write('<a href="website_page3.html"><img src="images/website_dm2_thum.png" /></a>');
		document.write('<a href="website_page4.html"><img src="images/website_tam_thum.png" class="here" /></a>');
		document.write('<a href="website_page5.html"><img src="images/website_dm1_thum.png" /></a>');
	}
	/* 
	 * DM1
	 */
	else if(pageName == 5)
	{
		document.write('<a href="website_page0.html"><img src="images/website_xbox_thum.png" /></a>');
		document.write('<a href="website_page1.html"><img src="images/website_capstone_thum.png" /></a>');
		document.write('<a href="website_page2.html"><img src="images/website_csel_thum.png" /></a>');
		document.write('<a href="website_page3.html"><img src="images/website_dm2_thum.png" /></a>');
		document.write('<a href="website_page4.html"><img src="images/website_tam_thum.png" /></a>');
		document.write('<a href="website_page5.html"><img src="images/website_dm1_thum.png" class="here" /></a>');
	}
	/*
	 * error
	 */
	else
	{
		document.write('<a href="website_page0.html"><img src="images/website_xbox_thum.png" /></a>');
		document.write('<a href="website_page1.html"><img src="images/website_capstone_thum.png" /></a>');
		document.write('<a href="website_page2.html"><img src="images/website_csel_thum.png" /></a>');
		document.write('<a href="website_page3.html"><img src="images/website_dm2_thum.png" /></a>');
		document.write('<a href="website_page4.html"><img src="images/website_tam_thum.png" /></a>');
		document.write('<a href="website_page5.html"><img src="images/website_dm1_thum.png" /></a>');
	}
	
}